package com.endpoint.book.feign;

import com.endpoint.book.to.MemberBuyRecordTo;
import com.endpoint.book.to.MemberTo;
import com.endpoint.common.utils.ResultBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Project: endpoint
 * @Name: MemberFeignService
 * @Author: Jack_Li
 * @Date: 2024/7/6 16:29
 */
@FeignClient(value = "endpoint-member")
public interface MemberFeignService {

    @PostMapping("/member/queryByIds")
    List<MemberTo> queryByIds(@RequestBody List<Long> ids);

    @GetMapping("/member/memberBuyRecord/getBuyRecord/{memberId}/{indexId}")
    public ResultBean<MemberBuyRecordTo> getBuyRecordBymemberIdAndIndexId(@PathVariable("memberId")Long memberId,
                                                                          @PathVariable("indexId")Long indexId );

}
